<template>
  <view class="card-modern">
    <view class="card-left">
      <image :src="cardInfo.avatar" class="avatar" mode="widthFix"></image>
      <image :src="cardInfo.qrcode" class="qrcode" mode="widthFix"></image>
    </view>
    <view class="card-right">
      <view class="name">{{ cardInfo.name }}</view>
      <view class="title">{{ cardInfo.title }}</view>
      <view class="company">{{ cardInfo.company }}</view>
      
      <view class="divider"></view>
      
      <view class="contact-item">
        <text class="label">电话</text>
        <text class="value">{{ cardInfo.phone }}</text>
      </view>
      <view class="contact-item">
        <text class="label">邮箱</text>
        <text class="value">{{ cardInfo.email }}</text>
      </view>
      <view class="contact-item">
        <text class="label">地址</text>
        <text class="value">{{ cardInfo.address }}</text>
      </view>
    </view>
  </view>
</template>

<script setup>
// import { defineProps } from 'vue'

const props = defineProps({
		cardInfo: {
			type: Object,
			default: () => ({
				name: '张三-Modern',
				title: '总经理',
				company: '深圳市惠森信息科技有限公司',
				phone: '15013869352',
				email: 'asdf@test.com',
				address: '同乐村',
				avatar: 'https://picsum.photos/id/1005/200/200',
				qrcode: 'https://picsum.photos/id/237/100/100'
			})
		}
	})
</script>

<style scoped>
.card-modern {
  width: 640rpx;
  border-radius: 12rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  background-color: #fafafa;
}

.card-left {
  width: 180rpx;
  background-color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30rpx 0;
}

.avatar {
  width: 120rpx;
  height: 120rpx;
  border-radius: 8rpx;
  border: 3rpx solid white;
}

.qrcode {
  width: 100rpx;
  height: 100rpx;
  margin-top: 30rpx;
  background-color: white;
  padding: 5rpx;
  border-radius: 5rpx;
}

.card-right {
  flex: 1;
  padding: 30rpx;
}

.name {
  font-size: 40rpx;
  font-weight: bold;
  color: #222;
  letter-spacing: -0.5rpx;
}

.title {
  font-size: 28rpx;
  color: #555;
  margin-top: 5rpx;
}

.company {
  font-size: 26rpx;
  color: #888;
  margin-top: 5rpx;
}

.divider {
  height: 1px;
  background-color: #eee;
  margin: 20rpx 0;
}

.contact-item {
  display: flex;
  margin-bottom: 15rpx;
}

.label {
  font-size: 24rpx;
  color: #999;
  width: 80rpx;
}

.value {
  font-size: 26rpx;
  color: #333;
  flex: 1;
}
</style>
